package com.qf.day12;

import java.io.FileNotFoundException;
import java.util.List;
import java.util.Scanner;

/**
 * 使用 ArtShowService接口实现一些功能
 */
public class ArtShowDemo {

    public static void main(String[] args) throws FileNotFoundException {

        ArtShowService artShowService = new ArtShowServiceImpl();

        while (true){
            System.out.println("1. 展示全部 2.添加才艺 3.才艺通过 4.未表演名单");
            Scanner scanner = new Scanner(System.in);
            String s = scanner.next();

            switch (s){

                case "1":
                    List<ArtShow> all = artShowService.getAll();
                    all.forEach(e-> System.out.println(e));
                    break;
                case "2":
                    System.out.println("请输入学生的名字");
                    String name = scanner.next();
                    artShowService.addArtShow(name);
                    break;
                case "3":
                    System.out.println("请输入学生的名字");
                    String name1 = scanner.next();
                    ArtShow artShow = new ArtShow(name1, "唱歌", 1, 0);
                    artShowService.updateArtShow(artShow);
                    break;
                case "4":
                    List<String> noShowNames = artShowService.getNoShowNames();
                    System.out.println(noShowNames);
                    break;
                case "5":
                    System.out.println("886");
                    return;
                default:
                    System.out.println("输入错误");

            }

        }

    }

}
